//
//  AllOrdersInTheRestaurantTableViewCell.m
//  Park
//
//  Created by 123456 on 2017/12/11.
//  Copyright © 2017年 YTYangK. All rights reserved.
//

#import "AllOrdersInTheRestaurantTableViewCell.h"

@implementation AllOrdersInTheRestaurantTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (void)setModelCellData:(AllOrdersInTheRestaurantModel *)modelCellData {

    
    
    if ([modelCellData.status isEqualToString:@"0"]) {
        self.CancelBUtton.alpha = 1;
        self.ConfirmBUtton.alpha = 1;
        self.ConfirmLabel.alpha = 0;
    }else if([modelCellData.status isEqualToString:@"1"]){
        self.CancelBUtton.alpha = 0;
        self.ConfirmBUtton.alpha = 0;
        self.ConfirmLabel.alpha=1;
        self.ConfirmLabel.text = @"已确认";
        self.ConfirmLabel.textColor =  RGB(40, 130, 60, 1.0);
    }else if ([modelCellData.status isEqualToString:@"-1"]){
        self.CancelBUtton.alpha = 0;
        self.ConfirmBUtton.alpha = 0;
        self.ConfirmLabel.alpha=1;
        self.ConfirmLabel.text = @"已取消";
        self.ConfirmLabel.textColor = RGB(193, 33, 71, 1.0);
        
    }
    
    
    
    self.TimerLabel.text = [NSString stringWithFormat:@"下单时间：%@",modelCellData.operateTime];
    self.UserNameLabel.text =[NSString stringWithFormat:@"用户：%@",modelCellData.userName];
    self.UserPhoneNumberLabel.text =[NSString stringWithFormat:@"电话号码：%@",modelCellData.userPhone];
    self.MenuLabel.text =[NSString stringWithFormat:@"%@",modelCellData.carName];
    self.Totallabel.text =[NSString stringWithFormat:@"总价格：￥%@",modelCellData.momey];




}

- (IBAction)queren:(id)sender {
    
    [self.delegate confirm:sender];

}


- (IBAction)quxiao:(id)sender {
    
    [self.delegate cancel:sender];
}


@end
